package cn.name168.ssm.service.impl;

import cn.name168.ssm.entity.User;
import cn.name168.ssm.mapper.UserMapper;
import cn.name168.ssm.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created by Nominal on 2018/4/5 0005.
 * 微博：@Mr丶Li_Anonym
 */
@Service
public class UserServiceImpl implements UserService {
    //自动注入UserMapper
    @Autowired
    UserMapper userMapper;

    /**
     * 获取user信息
     * @param id 用户id
     * @return 返回User信息
     */
    @Override
    public User findUserById(Integer id) {
        return userMapper.selectByPrimaryKey(id);
    }
}
